import Application from 'koa';
import send from './send';
import catchError from './catchError';

type Middleware = (app: Application) => void;

export default function startMiddle(app: Application) {
    const middlewares: Middleware[] = [send, catchError];

    middlewares.forEach(middleware => middleware(app));
}
